package rules;

import com.ruoyi.system.domain.vo.SysProductionPointVO;

<#list SysProductionPointVOList as item >
    <#if item.playItLow != -1>
        rule "${item.databaseBitNumber}dd"
        when
        $s : SysProductionPointVO(av < ${item.playItLow} && ${item.lowAndLow} < av && databaseBitNumber == ${item.databaseBitNumber})
        then
        $s.setAlert(1);
        $s.setAlertType("低低报");
        update($s);
        end
    </#if>
    <#if item.lowQuota != -1>
        rule "${item.databaseBitNumber}d"
        when
        $s : SysProductionPointVO(av < ${item.lowQuota} && ${item.playItLow} < av && ${item.lowAndLow} < av && databaseBitNumber == ${item.databaseBitNumber})
        then
        $s.setAlert(1);
        $s.setAlertType("低报");
        update($s);
        end
    </#if>
    <#if item.highQuota != -1>
        rule "${item.databaseBitNumber}g"
        when
        $s : SysProductionPointVO(av > ${item.highQuota} && av < ${item.highAndMighty} && databaseBitNumber == ${item.databaseBitNumber})
        then
        $s.setAlert(1);
        $s.setAlertType("高报");
        update($s);
        end
    </#if>
    <#if item.highAndMighty != -1>
        rule "${item.databaseBitNumber}gg"
        when
        $s : SysProductionPointVO(av > ${item.highAndMighty} && databaseBitNumber == ${item.databaseBitNumber})
        then
        $s.setAlert(1);
        $s.setAlertType("高高报");
        update($s);
        end
    </#if>
</#list>
